/* Copyright (c) 2004-2024 Peigen.info. All rights reserved. */

package info.peigen.hotpot.business.customer.core.repository.entity;

import com.gitee.peigenlpy.actable.annotation.Column;
import com.gitee.peigenlpy.actable.annotation.Table;
import com.gitee.peigenlpy.actable.annotation.Unique;
import com.gitee.peigenlpy.actable.constants.MySqlCharsetConstant;
import com.gitee.peigenlpy.actable.constants.MySqlEngineConstant;
import com.gitee.peigenlpy.actable.constants.MySqlTypeConstant;
import info.peigen.hotpot.business.customer.core.domain.weixin.miniapp.WxMiniappUser;
import info.peigen.hotpot.component.data.repository.beetlsql.entity.AbstractCreateTimeEntity;
import info.peigen.hotpot.component.data.repository.beetlsql.handler.JsonConvertBeetlSqlHandler;
import lombok.*;
import lombok.experimental.Accessors;
import lombok.experimental.FieldDefaults;

/**
 * <b>(CustomerTechEntity)</b>
 *
 * @author Peigen
 * @version 1.0.0
 * @since 2021/11/3
 */
@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@FieldDefaults(level = AccessLevel.PRIVATE)
@Accessors(chain = true)
@Table(name = "customer_tech", comment = "客户模块与技术相关的内容", charset = MySqlCharsetConstant.UTF8MB4, engine = MySqlEngineConstant.InnoDB)
@org.beetl.sql.annotation.entity.Table(name = "customer_tech")
public class CustomerTechEntity extends AbstractCreateTimeEntity {
    @Column(name = "customer_id", type = MySqlTypeConstant.VARCHAR, length = 30, comment = "客户Id")
    @Unique(value = "customerId", columns = "customer_id")
    @org.beetl.sql.annotation.entity.Column("customer_id")
    String        customerId;
    @Column(name = "openid", type = MySqlTypeConstant.VARCHAR, length = 30, comment = "微信识别码")
    @org.beetl.sql.annotation.entity.Column("openid")
    String        openid;
    @Column(name = "wx_miniapp_user", type = MySqlTypeConstant.JSON, length = 4000, comment = "微信客户;保存wxMiniappUser JSON,后续考虑用虚拟字段增加索引")
    @org.beetl.sql.annotation.entity.Column("wx_miniapp_user")
    @JsonConvertBeetlSqlHandler
    WxMiniappUser wxMiniappUser;
}